import { http, jumpExport } from '@/utils/http/axios';

// 获取轮播图列表
export function List(params) {
  return http.request({
    url: '/cardBanners/list',
    method: 'get',
    params,
  });
}

// 删除/批量删除轮播图
export function Delete(params) {
  return http.request({
    url: '/cardBanners/delete',
    method: 'POST',
    params,
  });
}

// 添加/编辑轮播图
export function Edit(params) {
  return http.request({
    url: '/cardBanners/edit',
    method: 'POST',
    params,
  });
}

// 操作轮播图开关
export function Switch(params) {
  return http.request({
    url: '/cardBanners/switch',
    method: 'POST',
    params,
  });
}

// 获取轮播图指定详情
export function View(params) {
  return http.request({
    url: '/cardBanners/view',
    method: 'GET',
    params,
  });
}

// 导出轮播图
export function Export(params) {
  jumpExport('/cardBanners/export', params);
}